import {createApp} from 'vue'
import ElementPlus from 'element-plus'
import router from './router/router.js'
import 'element-plus/dist/index.css'
import App from './App.vue'
import '@vuemap/vue-amap/dist/style.css'
import VueAMap, {initAMapApiLoader} from '@vuemap/vue-amap'
import Vue3BaiduMapGL from 'vue3-baidu-map-gl'

const env = import.meta.env
initAMapApiLoader({
  key: env.VITE_APP_AMAP_APP_KEY,        // 高德地图key
  securityJsCode: env.VITE_APP_AMAP_SEC_KEY, // 新版key需要配合安全密钥使用
})

createApp(App)
  .use(VueAMap)
  .use(Vue3BaiduMapGL, {
    ak: env.VITE_APP_BMAP_APP_KEY,
    plugins: ['TrackAnimation']
  })
  .use(ElementPlus)
  .use(router)
  .mount('#app')
